package org.example.dto;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

/**
 * 用户注册数据传输对象
 */
@Data
public class UserRegistrationDTO {

    @NotBlank(message = "用户名不能为空")
    @Size(min = 3, max = 50, message = "用户名长度应在3到50个字符之间")
    private String username;

    @NotBlank(message = "电子邮件不能为空")
    @Size(max = 100, message = "电子邮件长度不能超过100个字符")
    private String email;

    @NotBlank(message = "密码不能为空")
    private String passwordHash;
}